package com.ygou.controller;

import java.util.List;

import javax.servlet.http.HttpSession;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.SessionAttributes;

import com.ygou.pojo.Category;
import com.ygou.service.CategoryService;

@Controller
@RequestMapping(value="/cate")
@SessionAttributes()
public class CategoryController {
	@Autowired
	CategoryService categoryService;
	@RequestMapping(value="/selectByExample")
	public String selectByExample(HttpSession session){
		List<Category> list=categoryService.selectByExample();
		session.setAttribute("list", list);
		return "redirect:/admin/index.jsp";
	}
}
